#include <iostream>
#include <string>
#include <map>
using namespace std;


bool canConstruct(string ransomNote, string magazine) {
        if(ransomNote.size() == 0) return true;
        map<char,int> recmap1;
        map<char,int> recmap2;
        int pointer1=0;
        int pointer2=0;
        while(pointer1 < ransomNote.size() || pointer2 < magazine.size()){
            if(pointer1 < ransomNote.size()){
                ++recmap1[ransomNote[pointer1]];
                ++pointer1;
            }
            if(pointer2 < magazine.size()){
                ++recmap2[magazine[pointer2]];
                ++pointer2;
            }
        }
        for(auto p = recmap1.begin();p!=recmap1.end();++p){
            if(recmap2.find(p->first) == recmap2.end() || p->second < recmap2[p->first])
                return false;
        }
        return true;
}

int main(int argc, char const *argv[])
{
    
    return 0;
}
